#pragma once
#include "../Base/TypeDefine.hpp"
namespace NAMESPACENAME
{
	namespace DirectX
	{
		class D3D12Device;
		class D3D12Fence
		{
			ID3D12Fence1* fence;
			friend D3D12Device;
			inline D3D12Fence(ID3D12Fence1* fence) :
				fence(fence)
			{
			}
		public:
			inline UINT64 GetCompletedValue()
			{
				return fence->GetCompletedValue();
			}
			inline bool SetEventOnCompletion(UINT64 Value, HANDLE hEvent)
			{
				return SUCCEEDED(fence->SetEventOnCompletion(Value, hEvent));
			}
			inline bool Signal(UINT64 Value)
			{
				return SUCCEEDED(fence->Signal(Value));
			}
		};
	}
}